<?php
namespace jy_weishop_en;
defined('BY_JYA') or exit('error');
/*
	PC
*/
class pc extends \plugin{
	public function show_adv($set,$setname, $width, $height, $target = NULL){
		if($setname=='top'){
			if(intval($set['top_status'])==1){
			$title = ((empty($set['top_title']) ? '' : 'title=\'' . trim($set['top_title']) . '\''));
			$link = ((empty($set['top_link']) ? '' : trim($set['top_link'])));
			$width = $width;
			$height =$height;
			$src = ((empty($set['top_image']) ? '' : tomedia(trim($set['top_image']))));
			$alt = ((empty($set['top_imagedesc']) ? '' : trim($set['top_imagedesc'])));
			$target = ((empty($target) ? '' : 'target=\'_blank\''));
			echo '<a href=\'' . $link . '\' ' . $target . ' ' . $title . '><img style=\'' . $width . $height . '\' border=\'0\' src=\'' . $src . '\' alt=\'' . $alt . '\'/></a>';
			}
			else{
				return;
			}
			
		}
		elseif($setname=='logo'){
			if(intval($set['logo_status'])==1){
			$title = ((empty($set['logo_title']) ? '' : 'title=\'' . trim($set['logo_title']) . '\''));
			$link = ((empty($set['logo_link']) ? '' : trim($set['logo_link'])));
			$width = $width;
			$height =$height;
			$src = ((empty($set['logo_image']) ? '' : tomedia(trim($set['logo_image']))));
			$alt = ((empty($set['logo_imagedesc']) ? '' : trim($set['logo_imagedesc'])));
			$target = ((empty($target) ? '' : 'target=\'_blank\''));
			echo '<a href=\'' . $link . '\' ' . $target . ' ' . $title . '><img style=\'' . $width . $height . '\' border=\'0\' src=\'' . $src . '\' alt=\'' . $alt . '\'/></a>';
			}
			else{
				return;
			}
			
		}
		elseif($setname=='middle'){
			if(intval($set['logo_status'])==1){
			$title = ((empty($set['logo_title']) ? '' : 'title=\'' . trim($set['logo_title']) . '\''));
			$link = ((empty($set['logo_link']) ? '' : trim($set['logo_link'])));
			$width = $width;
			$height =$height;
			$src = ((empty($set['logo_image']) ? '' : tomedia(trim($set['logo_image']))));
			$alt = ((empty($set['logo_imagedesc']) ? '' : trim($set['logo_imagedesc'])));
			$target = ((empty($target) ? '' : 'target=\'_blank\''));
			echo '<a href=\'' . $link . '\' ' . $target . ' ' . $title . '><img style=\'' . $width . $height . '\' border=\'0\' src=\'' . $src . '\' alt=\'' . $alt . '\'/></a>';
			}
			else{
				return;
			}
			
		}
		elseif($setname=='right'){
			if(intval($set['right_status'])==1){
			$title = ((empty($set['right_title']) ? '' : 'title=\'' . trim($set['right_title']) . '\''));
			$link = ((empty($set['right_link']) ? '' : trim($set['right_link'])));
			$width = $width;
			$height =$height;
			$src = ((empty($set['right_image']) ? '' : tomedia(trim($set['right_image']))));
			$alt = ((empty($set['right_imagedesc']) ? '' : trim($set['right_imagedesc'])));
			$target = ((empty($target) ? '' : 'target=\'_blank\''));
			echo '<a href=\'' . $link . '\' ' . $target . ' ' . $title . '><img style=\'' . $width . $height . '\' border=\'0\' src=\'' . $src . '\' alt=\'' . $alt . '\'/></a>';
			}
			else{
				return;
			}
			
		}
		elseif($setname=='bottom'){
			if(intval($set['bottom_status'])==1){
			$title = ((empty($set['bottom_title']) ? '' : 'title=\'' . trim($set['bottom_title']) . '\''));
			$link = ((empty($set['bottom_link']) ? '' : trim($set['bottom_link'])));
			$width = $width;
			$height =$height;
			$src = ((empty($set['bottom_image']) ? '' : tomedia(trim($set['bottom_image']))));
			$alt = ((empty($set['bottom_imagedesc']) ? '' : trim($set['bottom_imagedesc'])));
			$target = ((empty($target) ? '' : 'target=\'_blank\''));
			echo '<a href=\'' . $link . '\' ' . $target . ' ' . $title . '><img style=\'' . $width . $height . '\' border=\'0\' src=\'' . $src . '\' alt=\'' . $alt . '\'/></a>';
			}
			else{
				return;
			}
			
		}
	}
}